


<?php

	//phpinfo();
	set_include_path('.;D:\wamp\bin\php\php5.4.3\pear');
	require_once "HTML/Table.php";
	
	$attributes = array('border' => '1');
	$table = new HTML_Table($attributes);
	
	
	$table->setHeaderContents(0, 0, "Mã thú");
	$table->setHeaderContents(0, 1, "Tên");
	$table->setHeaderContents(0, 2, "Đơn giá");
	$table->setHeaderContents(0, 3, "Hình ảnh");
	$table->setHeaderContents(0, 4, "Số lượng");
	$table->setHeaderContents(0, 5, "Ngày sinh");
	$table->setHeaderContents(0, 6, "Xuất xứ");
	$table->setHeaderContents(0, 7, "Loài");
	$table->setHeaderContents(0, 8, "Mô tả");
	
	$numRow = 1;
	
	while($row = $todo->fetch_array())
	{
		
			
			$table->setCellContents($numRow,0,$row['maThu']);
			$table->setCellContents($numRow,1,$row['tenThu']);
			$table->setCellContents($numRow,2,$row['donGiaThu']);
			$table->setCellContents($numRow,3,'<img src=\''.$row['hinhAnhThu'].'\' width=50px/>');
			//$table->setCellContents($numRow,3,$row['hinhAnhThu']);
			$table->setCellContents($numRow,4,$row['soLuongThu']);
			$table->setCellContents($numRow,5,$row['ngaySinhThu']);
			$table->setCellContents($numRow,6,$row['xuatXuThu']);
			$table->setCellContents($numRow,7,$row['loaiThu']);
			$table->setCellContents($numRow,8,$row['moTaThu']);
			
		
		//echo '<br>'.$row['tenThu'].'<br>';
		$numRow++;
		
	}
	$table->altRowAttributes(0,array("class"=>"alt1"),array("class"=>"alt"));
	echo $table->toHTML();